docs: vault relay-server spec (Postgres + /api/vault)#5
Merged
Conversation
Server-side design for the vault feature — the relay-server half that the atem 'atem vault' CLI (Atem repo PR #10) already calls. - Postgres schema (vaults + append-only versioned vault_entries); the relay-server's first persistent store (everything is in-memory today). - The 5 /api/vault endpoints matching the fixed atem client contract. - Auth + work-session resolution (session authenticates, client_id/ writer_list authorizes) with three options and a recommendation. - Required atem_id sanitizer change (percent-decode + keep non-ASCII). - File-by-file implementation tasks grounded in the existing relay-server conventions (routes.rs / rtc_session.rs patterns, AppState, tests). Self-contained; coding agent on the Astation machine can start from this. 🤖 Built with SMT <smt@agora.build>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Server-side design for the vault feature — the relay-server half that the atem
atem vaultCLI (Atem repo PR #10, already merged) calls. Self-contained so a coding agent on the Astation machine can start from it without the Atem repo.docs/specs/2026-05-29-vault-relay-server-design.md:vaults+ append-only versionedvault_entries. This is the relay-server's first persistent store (everything isRwLock<HashMap>today), so the bulk of the work is adding Postgres + a migration + a pool inAppState./api/vaultendpoints, matching the fixed atem client contract (field names must matchAtem/src/vault_client.rsor deserialization breaks).session_idauthenticates,client_id/writer_listauthorizes;can_read/can_writepredicates. The one real design decision (how a session maps to awork_session_id) is laid out with three options + a recommendation (bind sessions to astation_id).atem_idsanitizer change (relay.rs:303-308) — percent-decode + keep non-ASCII (CJK), restrict ASCII to[A-Za-z0-9-]. Can land as its own small commit.routes.rs/rtc_session.rshandler patterns,AppState, inline#[tokio::test]+oneshot), plus acceptance test, build/deploy (docker-compose Postgres +DATABASE_URL), and open questions.Cross-repo contract:
Atem/designs/vault.md(data + auth model) andAtem/designs/vault-implementation-plan.md(the merged client). This spec is the authoritative server contract.Docs only — no code.
Generated with SMT smt@agora.build